package DAOPackage;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
 


public class ConnectionManager
{
    static Connection conn;
 
    public static Connection getConnection()
    {
    	
        try
        {
        //selam nezihe!
            String url = "jdbc:mysql://titan.cmpe.boun.edu.tr:3306/database5";
            String dbName ="database5"; // here "database5" is the name of Database.
            String uname = "project5";
            String pwd = "MuEz4X54";
        
            Class.forName("com.mysql.jdbc.Driver");
        
            try
            {
                conn = DriverManager.getConnection(url,uname,pwd);
            
            }
            catch (SQLException ex)
            {
            	
                ex.printStackTrace();
            }
        }
        catch(ClassNotFoundException e)
        {
            System.out.println(e);
        }
        return conn;
    }
 
}
